Optimal. Leaf size=196 \[ \frac{a b d \text{PolyLog}\left (2,\frac{(a-b) e^{-2 (e+f x)}}{a+b}\right )}{f^2 \left (a^2-b^2\right )^2}+\frac{b (-2 a c f-2 a d f x+b d) \log \left (1-\frac{(a-b) e^{-2 (e+f x)}}{a+b}\right )}{f^2 \left (a^2-b^2\right )^2}+\frac{b (c+d x)}{f \left (a^2-b^2\right ) (a+b \coth (e+f x))}-\frac{(c+d x)^2}{2 d \left (a^2-b^2\right )}+\frac{(-2 a c f-2 a d f x+b d)^2}{4 a d f^2 (a-b) (a+b)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.295785, antiderivative size = 196, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.278, Rules used = {3733, 3731, 2190, 2279, 2391} \[ \frac{a b d \text{PolyLog}\left (2,\frac{(a-b) e^{-2 (e+f x)}}{a+b}\right )}{f^2 \left (a^2-b^2\right )^2}+\frac{b (-2 a c f-2 a d f x+b d) \log \left (1-\frac{(a-b) e^{-2 (e+f x)}}{a+b}\right )}{f^2 \left (a^2-b^2\right )^2}+\frac{b (c+d x)}{f \left (a^2-b^2\right ) (a+b \coth (e+f x))}-\frac{(c+d x)^2}{2 d \left (a^2-b^2\right )}+\frac{(-2 a c f-2 a d f x+b d)^2}{4 a d f^2 (a-b) (a+b)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3733
Rule 3731
Rule 2190
Rule 2279
Rule 2391
Rubi steps
\begin{align*} \int \frac{c+d x}{(a+b \coth (e+f x))^2} \, dx &=-\frac{(c+d x)^2}{2 \left (a^2-b^2\right ) d}+\frac{b (c+d x)}{\left (a^2-b^2\right ) f (a+b \coth (e+f x))}-\frac{i \int \frac{-i b d+2 i a c f+2 i a d f x}{a+b \coth (e+f x)} \, dx}{\left (a^2-b^2\right ) f}\\ &=-\frac{(c+d x)^2}{2 \left (a^2-b^2\right ) d}+\frac{(b d-2 a c f-2 a d f x)^2}{4 a (a-b) (a+b)^2 d f^2}+\frac{b (c+d x)}{\left (a^2-b^2\right ) f (a+b \coth (e+f x))}+\frac{(2 i b) \int \frac{e^{-2 (e+f x)} (-i b d+2 i a c f+2 i a d f x)}{(a+b)^2+\left (-a^2+b^2\right ) e^{-2 (e+f x)}} \, dx}{\left (a^2-b^2\right ) f}\\ &=-\frac{(c+d x)^2}{2 \left (a^2-b^2\right ) d}+\frac{(b d-2 a c f-2 a d f x)^2}{4 a (a-b) (a+b)^2 d f^2}+\frac{b (c+d x)}{\left (a^2-b^2\right ) f (a+b \coth (e+f x))}+\frac{b (b d-2 a c f-2 a d f x) \log \left (1-\frac{(a-b) e^{-2 (e+f x)}}{a+b}\right )}{\left (a^2-b^2\right )^2 f^2}+\frac{(2 a b d) \int \log \left (1+\frac{\left (-a^2+b^2\right ) e^{-2 (e+f x)}}{(a+b)^2}\right ) \, dx}{\left (a^2-b^2\right )^2 f}\\ &=-\frac{(c+d x)^2}{2 \left (a^2-b^2\right ) d}+\frac{(b d-2 a c f-2 a d f x)^2}{4 a (a-b) (a+b)^2 d f^2}+\frac{b (c+d x)}{\left (a^2-b^2\right ) f (a+b \coth (e+f x))}+\frac{b (b d-2 a c f-2 a d f x) \log \left (1-\frac{(a-b) e^{-2 (e+f x)}}{a+b}\right )}{\left (a^2-b^2\right )^2 f^2}-\frac{(a b d) \operatorname{Subst}\left (\int \frac{\log \left (1+\frac{\left (-a^2+b^2\right ) x}{(a+b)^2}\right )}{x} \, dx,x,e^{-2 (e+f x)}\right )}{\left (a^2-b^2\right )^2 f^2}\\ &=-\frac{(c+d x)^2}{2 \left (a^2-b^2\right ) d}+\frac{(b d-2 a c f-2 a d f x)^2}{4 a (a-b) (a+b)^2 d f^2}+\frac{b (c+d x)}{\left (a^2-b^2\right ) f (a+b \coth (e+f x))}+\frac{b (b d-2 a c f-2 a d f x) \log \left (1-\frac{(a-b) e^{-2 (e+f x)}}{a+b}\right )}{\left (a^2-b^2\right )^2 f^2}+\frac{a b d \text{Li}_2\left (\frac{(a-b) e^{-2 (e+f x)}}{a+b}\right )}{\left (a^2-b^2\right )^2 f^2}\\ \end{align*}
Mathematica [C] time = 6.00419, size = 477, normalized size = 2.43 \[ \frac{\text{csch}^2(e+f x) (a \sinh (e+f x)+b \cosh (e+f x)) \left (-2 a d (a \sinh (e+f x)+b \cosh (e+f x)) \left (b \text{PolyLog}\left (2,e^{-2 \left (\tanh ^{-1}\left (\frac{b}{a}\right )+e+f x\right )}\right )+a \sqrt{1-\frac{b^2}{a^2}} e^{-\tanh ^{-1}\left (\frac{b}{a}\right )} (e+f x)^2-i b \left (\pi -2 i \tanh ^{-1}\left (\frac{b}{a}\right )\right ) (e+f x)-2 b \left (\tanh ^{-1}\left (\frac{b}{a}\right )+e+f x\right ) \log \left (1-e^{-2 \left (\tanh ^{-1}\left (\frac{b}{a}\right )+e+f x\right )}\right )+2 b \tanh ^{-1}\left (\frac{b}{a}\right ) \log \left (i \sinh \left (\tanh ^{-1}\left (\frac{b}{a}\right )+e+f x\right )\right )+i \pi b \log \left (e^{2 (e+f x)}+1\right )-i \pi b \log (\cosh (e+f x))\right )+2 b f \left (b^2-a^2\right ) (c+d x) \sinh (e+f x)-\left (a^2-b^2\right ) (e+f x) (d (e-f x)-2 c f) (a \sinh (e+f x)+b \cosh (e+f x))-4 a c f (a \sinh (e+f x)+b \cosh (e+f x)) (a (e+f x)-b \log (a \sinh (e+f x)+b \cosh (e+f x)))+2 b d (a \sinh (e+f x)+b \cosh (e+f x)) (a (e+f x)-b \log (a \sinh (e+f x)+b \cosh (e+f x)))+4 a d e (a \sinh (e+f x)+b \cosh (e+f x)) (a (e+f x)-b \log (a \sinh (e+f x)+b \cosh (e+f x)))\right )}{2 f^2 (b-a) (a+b) \left (a^2-b^2\right ) (a+b \coth (e+f x))^2} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.234, size = 620, normalized size = 3.2 \begin{align*}{\frac{d{x}^{2}}{2\,{a}^{2}+4\,ab+2\,{b}^{2}}}+{\frac{cx}{{a}^{2}+2\,ab+{b}^{2}}}-2\,{\frac{{b}^{2} \left ( dx+c \right ) }{ \left ( a-b \right ) f \left ({a}^{2}+2\,ab+{b}^{2} \right ) \left ( a{{\rm e}^{2\,fx+2\,e}}+b{{\rm e}^{2\,fx+2\,e}}-a+b \right ) }}-2\,{\frac{{b}^{2}d\ln \left ({{\rm e}^{fx+e}} \right ) }{ \left ( a-b \right ) ^{2}{f}^{2} \left ({a}^{2}+2\,ab+{b}^{2} \right ) }}+{\frac{{b}^{2}d\ln \left ( a{{\rm e}^{2\,fx+2\,e}}+b{{\rm e}^{2\,fx+2\,e}}-a+b \right ) }{ \left ( a-b \right ) ^{2}{f}^{2} \left ({a}^{2}+2\,ab+{b}^{2} \right ) }}+4\,{\frac{abc\ln \left ({{\rm e}^{fx+e}} \right ) }{ \left ( a-b \right ) ^{2}f \left ({a}^{2}+2\,ab+{b}^{2} \right ) }}-2\,{\frac{abc\ln \left ( a{{\rm e}^{2\,fx+2\,e}}+b{{\rm e}^{2\,fx+2\,e}}-a+b \right ) }{ \left ( a-b \right ) ^{2}f \left ({a}^{2}+2\,ab+{b}^{2} \right ) }}-4\,{\frac{abde\ln \left ({{\rm e}^{fx+e}} \right ) }{ \left ( a-b \right ) ^{2}{f}^{2} \left ({a}^{2}+2\,ab+{b}^{2} \right ) }}+2\,{\frac{abde\ln \left ( a{{\rm e}^{2\,fx+2\,e}}+b{{\rm e}^{2\,fx+2\,e}}-a+b \right ) }{ \left ( a-b \right ) ^{2}{f}^{2} \left ({a}^{2}+2\,ab+{b}^{2} \right ) }}-2\,{\frac{abdx}{ \left ( a-b \right ) ^{2}f \left ({a}^{2}+2\,ab+{b}^{2} \right ) }\ln \left ( 1-{\frac{ \left ( a+b \right ){{\rm e}^{2\,fx+2\,e}}}{a-b}} \right ) }-2\,{\frac{abde}{ \left ( a-b \right ) ^{2}{f}^{2} \left ({a}^{2}+2\,ab+{b}^{2} \right ) }\ln \left ( 1-{\frac{ \left ( a+b \right ){{\rm e}^{2\,fx+2\,e}}}{a-b}} \right ) }+2\,{\frac{abd{x}^{2}}{ \left ( a-b \right ) ^{2} \left ({a}^{2}+2\,ab+{b}^{2} \right ) }}+4\,{\frac{abdex}{ \left ( a-b \right ) ^{2}f \left ({a}^{2}+2\,ab+{b}^{2} \right ) }}+2\,{\frac{abd{e}^{2}}{ \left ( a-b \right ) ^{2}{f}^{2} \left ({a}^{2}+2\,ab+{b}^{2} \right ) }}-{\frac{bda}{ \left ( a-b \right ) ^{2}{f}^{2} \left ({a}^{2}+2\,ab+{b}^{2} \right ) }{\it polylog} \left ( 2,{\frac{ \left ( a+b \right ){{\rm e}^{2\,fx+2\,e}}}{a-b}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} -\frac{1}{2} \,{\left (8 \, a b f \int \frac{x}{a^{4} f e^{\left (2 \, f x + 2 \, e\right )} + 2 \, a^{3} b f e^{\left (2 \, f x + 2 \, e\right )} - 2 \, a b^{3} f e^{\left (2 \, f x + 2 \, e\right )} - b^{4} f e^{\left (2 \, f x + 2 \, e\right )} - a^{4} f + 2 \, a^{2} b^{2} f - b^{4} f}\,{d x} + 2 \, b^{2}{\left (\frac{2 \,{\left (f x + e\right )}}{{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} f^{2}} - \frac{\log \left ({\left (a + b\right )} e^{\left (2 \, f x + 2 \, e\right )} - a + b\right )}{{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} f^{2}}\right )} + \frac{{\left (a^{2} f e^{\left (2 \, e\right )} - b^{2} f e^{\left (2 \, e\right )}\right )} x^{2} e^{\left (2 \, f x\right )} - 4 \, b^{2} x -{\left (a^{2} f - 2 \, a b f + b^{2} f\right )} x^{2}}{a^{4} f - 2 \, a^{2} b^{2} f + b^{4} f -{\left (a^{4} f e^{\left (2 \, e\right )} + 2 \, a^{3} b f e^{\left (2 \, e\right )} - 2 \, a b^{3} f e^{\left (2 \, e\right )} - b^{4} f e^{\left (2 \, e\right )}\right )} e^{\left (2 \, f x\right )}}\right )} d - c{\left (\frac{2 \, a b \log \left (-{\left (a - b\right )} e^{\left (-2 \, f x - 2 \, e\right )} + a + b\right )}{{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} f} + \frac{2 \, b^{2}}{{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4} -{\left (a^{4} - 2 \, a^{3} b + 2 \, a b^{3} - b^{4}\right )} e^{\left (-2 \, f x - 2 \, e\right )}\right )} f} - \frac{f x + e}{{\left (a^{2} + 2 \, a b + b^{2}\right )} f}\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.55933, size = 4058, normalized size = 20.7 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: TypeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{d x + c}{{\left (b \coth \left (f x + e\right ) + a\right )}^{2}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]